package entity

import (
	"hobby-mate/common"
)

// Comment 评论信息
type Comment struct {
	CommentId int    `json:"commentId" form:"comment_id"  gorm:"primary_key;comment:评论唯一标识符"`
	PostId    int    `json:"postId" form:"post_id"  gorm:"not null;comment:帖子 ID"`
	ParentId  int    `json:"parentId" form:"parent_id" gorm:"comment:父评论 ID，顶级评论为 NULL"`
	AccountId int    `json:"accountId" form:"account_id"  gorm:"not null;comment:评论者用户 ID"`
	Content   string `json:"content" form:"content" gorm:"not null;comment:评论内容"`
	common.BaseEntity
}

func (Comment) TableName() string {
	return "t_comment"
}
